package model;

import java.util.List;

/**
 * 订单实体类，包含订单ID，用户名，订单项列表，和状态
 */
public class Order {
    private int id;
    private String username;
    //私有变量 items存储OrderItem列表
    private List<OrderItem> items;
    private String status;  // 订单状态，例如"未完成", "完成"

    public Order() {}

    public Order(int id, String username, List<OrderItem> items, String status) {
        this.id = id;
        this.username = username;
        this.items = items;
        this.status = status;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public List<OrderItem> getItems() {
        return items;
    }

    public void setItems(List<OrderItem> items) {
        this.items = items;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
